package com.ihome.excel.xlsx.test.validaterule;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

import com.ihome.excel.xlsx.entity.DataType;
import com.ihome.excel.xlsx.entity.ValidateRule;
import com.ihome.excel.xlsx.validate.ICellsValidateRule;

public class StudentImportValidateRule implements ICellsValidateRule {

    @Override
    public Map<String, ValidateRule> getValidateRule() {
        Map<String,ValidateRule> map = new HashMap<>();
        ValidateRule columnIndex0 = new ValidateRule();
        columnIndex0.setDataType(DataType.DATE);
        columnIndex0.setNotNull(true);
        columnIndex0.setStrLengthGt(10);
        map.put("0", columnIndex0);
        ValidateRule columnIndex3 = new ValidateRule();
        columnIndex3.setDataType(DataType.BIGDECIMAL);
        columnIndex3.setBigDecimalScale(4);
        columnIndex3.setBigDecimalRoundMode(BigDecimal.ROUND_DOWN);
        map.put("3", columnIndex3);
        return map;
    }

}